load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "tokenizer",
    srcs = [
        "buffer.go",
        "decoder.go",
        "scanner.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/util/json/tokenizer",
    visibility = ["//visibility:public"],
)

go_test(
    name = "tokenizer_test",
    srcs = [
        "bench_test.go",
        "decoder_test.go",
        "scanner_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":tokenizer"],
    deps = ["@com_github_stretchr_testify//require"],
)
